const express = require("express");
const path = require("path");

const app = express();

app.use(express.json());

app.use("/api/v1", require(path.join(__dirname, "/controllers/api_v1")));
app.use("/api/v2", require(path.join(__dirname, "/controllers/api_v2")));

app.get("/", function (req, res) {
  res.send("Hello from root route.");
});

app.listen(3000, () => {
  console.log("Server is running on port 3000");
});
